package com.yuye.cloud.common.model;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * 接口返回对象
 * @author xgf
 * @version 3.0.0
 */
@ApiModel(value = "返回值的统一封装")
public class Result<T> implements Serializable {

    /**
	 * Result serialVersionUID
	 */
	private static final long serialVersionUID = 1181928222387295095L;
	/**
     * 错误码
     */
	@ApiModelProperty(value = "code 默认0 成功 , 其他的对应关系 请看ResultEnum")
    private Integer code;
    /**
     * 提示信息
     */
	@ApiModelProperty(value = "提示信息")
    private String msg;
    /**
     * 返回值
     */
	@ApiModelProperty(value = "返回值")
    private T data;
    
    public Result() {
    	
	}
    
	public Result(Integer code, String msg, T data) {
		this.code = code;
		this.msg = msg;
		this.data = data;
	}
	public Integer getCode() {
		return code;
	}
	public void setCode(Integer code) {
		this.code = code;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public T getData() {
		return data;
	}
	public void setData(T data) {
		this.data = data;
	}
    
    
    
}
